package com.fzz.learning_forum.dao;

import com.fzz.learning_forum.domain.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;

@Mapper
@Component
public interface UserMapping {

    //用户登录
    @Select("select * from tb_user where username=#{username} and password=#{password}")
    public User userLogin(@Param("username")String username,@Param("password")String password);

    //修改用户信息
    @Update("update tb_user set username=#{username},password=#{password},email=#{email},school=#{school}")
    public Integer editUserInfo(User user);
}
